package com.gome.axwl.aoc.web.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.gome.axwl.aoc.entity.po.CsApplyInfoPo;

public class CarrierSettleUtil {

    public static List<Map<String, Object>> wrapCsApplyInfoData(CsApplyInfoPo info) {
        List<Map<String, Object>> result = new ArrayList<>();
        Map<String, Object> name = new HashMap<>();
        name.put("property", "服务商");
        name.put("value", info.getCarrrierSettleName());
        name.put("describe", "");
        result.add(name);
        
        Map<String, Object> juridicalPersonName = new HashMap<>();
        juridicalPersonName.put("property", "法人姓名");
        juridicalPersonName.put("value", info.getCsBasicInfo().getCorporationName());
        juridicalPersonName.put("describe", "");
        result.add(juridicalPersonName);
        
        Map<String, Object> juridicalPersonID = new HashMap<>();
        juridicalPersonID.put("property", "法人身份证号");
        juridicalPersonID.put("value", info.getCsBasicInfo().getCorporationIdCard());
        juridicalPersonID.put("describe", "");
        result.add(juridicalPersonID);

        Map<String, Object> effectiveDate = new HashMap<>();
        effectiveDate.put("property", "有效期");
        effectiveDate.put("value", info.getCsLicenseInfo().getValidateDateStart() + "—" + info.getCsLicenseInfo().getValidateDateEnd());
        effectiveDate.put("describe", "");
        result.add(effectiveDate);

        Map<String, Object> regCode = new HashMap<>();
        regCode.put("property", "注册号/统一社会信用代码");
        regCode.put("value", info.getCsLicenseInfo().getLicenseCode());
        regCode.put("describe", "");
        result.add(regCode);
        
        Map<String, Object> leader = new HashMap<>();
        leader.put("property", "营业者/法定代表人姓名");
        leader.put("value", info.getCsLicenseInfo().getCorparationName());
        leader.put("describe", "");
        result.add(leader);
        
        Map<String, Object> address = new HashMap<>();
        address.put("property", "经营场所/住所");
        address.put("value", info.getCsLicenseInfo().getLicenseAddress());
        address.put("describe", "");
        result.add(address);

        Map<String, Object> cars = new HashMap<>();
        cars.put("property", "车辆设备");
        Integer fixedCar = info.getCsLicenseInfo().getFixedCarNum();
        Integer tempCar = info.getCsLicenseInfo().getTempCarNum();
        cars.put("value", "常备" + fixedCar + "辆 / 临时" + tempCar + "辆");
        cars.put("describe", "");
        result.add(cars);

        Map<String, Object> bankAccountName = new HashMap<>();
        bankAccountName.put("property", "银行户名");
        bankAccountName.put("value", info.getCsLicenseInfo().getBankAccountName());
        bankAccountName.put("describe", "");
        result.add(bankAccountName);

        Map<String, Object> bankAccountNo = new HashMap<>();
        bankAccountNo.put("property", "银行账户");
        bankAccountNo.put("value", info.getCsLicenseInfo().getBankAccountNo());
        bankAccountNo.put("describe", "");
        result.add(bankAccountNo);

        Map<String, Object> serverType = new HashMap<>();
        serverType.put("property", "服务类型");
        serverType.put("value", info.getCsLicenseInfo().getLicenseAddress());
        serverType.put("describe", "");
        result.add(serverType);
        
        Map<String, Object> inviter = new HashMap<>();
        inviter.put("property", "邀请人");
        inviter.put("value", info.getSettleInviteNo());
        inviter.put("describe", "");
        result.add(inviter);
        
        Map<String, Object> cautionMoney = new HashMap<>();
        cautionMoney.put("property", "保证金");
        cautionMoney.put("value", info.getCautionMoney());
        cautionMoney.put("describe", "");
        result.add(cautionMoney);

        Map<String, Object> attach = new HashMap<>();
        attach.put("property", "附件下载");
        attach.put("value", info.getCsLicenseInfo().getLicenseAddress());
        attach.put("describe", "身份证、营业执照、合同详情");
        result.add(attach);

        return result;
    }

}
